<nz-layout class="home-wrap">
  <nz-sider class="home-sider-wrap" nzCollapsible [(nzCollapsed)]="isCollapsed" [nzTrigger]="null">

    <div class="logo">
      <div class="myapp-logo">
        <a [routerLink]="['/admin']">YY</a>
      </div>
      <!-- <div class="myapp-desc">我的app后台</div> -->
    </div>


    <ul class="home-menu" nz-menu [nzMode]="isCollapsed?'vertical':'inline'">

      <li nz-menu-item *ngFor="let item of navList;let idx = index;" (click)="navClick(idx, item)">
        <span>
          <i class="anticon anticon-file" [ngClass]="item.icon"></i>
          <span class="nav-text">{{item.name}}</span>
        </span>
      </li>

    </ul>
  </nz-sider>
  <nz-layout class="home-main-wrap">

    <nz-header class="home-header-wrap">
      <i class="anticon trigger" [class.anticon-menu-fold]="!isCollapsed" [class.anticon-menu-unfold]="isCollapsed" (click)="isCollapsed=!isCollapsed"></i>
      <div class="home-header-avatar-wrap">
        <div class="home-header-avatar-title" *ngIf="sUsername">
          <nz-dropdown [nzPlacement]="'bottomCenter'">
            <a class="ant-dropdown-link" nz-dropdown>
              {{sUsername}}
              <i class="anticon anticon-down"></i>
            </a>
            <ul nz-menu>
              <li nz-menu-item>
                <a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">个人资料</a>
              </li>
              <li nz-menu-item>
                <a rel="noopener noreferrer" href="javascript:;" (click)="logout()">退出登录</a>
              </li>
            </ul>
          </nz-dropdown>
        </div>

      </div>
    </nz-header>

    <nz-content class="home-content-wrap">
      <div class="home-content">
        <router-outlet></router-outlet>
      </div>
    </nz-content>

    <nz-footer class="home-footer">CYY ©2017 Implement By Angular
      <span>v1.0.0</span>
    </nz-footer>
  </nz-layout>
</nz-layout>
